<template>
	<view>
		<view class='commission-details'>
			<view class='promoterHeader bg-color'>
				<view class='headerCon acea-row row-between-wrapper'>
					<view>
						<view class='name'>{{name}} </view>
						<view class='money'>￥<text class='num'>{{userInfo.money}}</text>
						  <u-icon name="rmb-circle" size="50" color="rgba(0,0,0,0.6)"></u-icon>
						</view>
					</view>
					<view>
          
          </view>
				</view>
			</view>
			
		<view class='sign-record'>
				<block v-for="(item,index) in logsList" :key="index" v-if="logsList.length>0">
					<view class='list' style="margin-top: 30rpx;">
						<view class='item'>
						
							<view class='listn'>
								<view class='itemn acea-row row-between-wrapper'>
									<view>
											<view class='name line1' style="display: inherit;">
												 <text>{{item.user.nickname}}</text>
												
												<text style="color: #FA436A;float: right;">+{{item.price}}元</text>
												
												</view>
										<view>
											  <text style="color: #007BFF;">{{type[item.type]}}</text>
										</view>

										<view>{{item.created_at}}</view>
									</view>
									<!-- <view class='num' v-if="item.pm==0">-{{item.number}}</view> -->
									<!-- <view class='num font-color'> +{{item.money}}</view> -->
								</view>
							</view>
						</view>
					</view>
				</block>
				<view v-if="logsList.length == 0">
          <u-empty src="/static/empty-box.png" text="暂无提现记录~" icon-size="414" margin-top="50"></u-empty>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import UserModel from '../../model/user.js'
	export default {
		components: {
		},
		data() {
			return {
				name: '佣金明细',
				type: ['新用户','号码绑定','预约成功'],
				
				page: 1,
				limit: 8,
				recordList: [],
				logsList:[],
				recordType: 0,
				recordCount: 0,
				status: false,
				isAuto: false, //没有授权的不会自动授权
				isShowAuth: false, //是否隐藏授权
				extractCount: 0,
				userInfo:''
			};
		},
		onLoad() {
	  
	
	  	uni.setNavigationBarTitle({
	  		title: "佣金记录"
	  	});
	  	this.name = '佣金明细';
	  this.spreadInfo();
	  this.get_logs()
		},
	onShow: function() {
			
			// this.getRecordListCount();
		},
		methods: {
			
			getstatus(status){
				if(status ==-1)
					return '未通过'
				else if(status ==-1)
					return '审核中'
				else if(status ==1)
					return '已提现'
			},
			get_logs(){
				UserModel.get_fx_log().then(res=>{
					this.logsList=res.data
	
				})
			},
			spreadInfo(){
				this.userInfo=uni.getStorageSync('infor')
			},
			getRecordListCount: function() {
			
			}
		},
		onReachBottom: function() {
			this.getRecordList();
		}
	}
</script>

<style scoped lang="scss">
	.commission-details .promoterHeader .headerCon .money {
		font-size: 36rpx;
	}

	.commission-details .promoterHeader .headerCon .money .num {
		font-family: 'Guildford Pro';
	}
  .promoterHeader .headerCon{padding:0 88rpx 20rpx 55rpx;}
  .promoterHeader .headerCon .name{margin-bottom:10rpx;}
  .promoterHeader .headerCon .num{font-size:50rpx;}
  .promoterHeader .headerCon .iconfont{font-size:125rpx;}
  .listn {
    padding: 0 $gutter;
    .itemn  {
      padding: $gutter 0;
    }
    .small {
      font-size: 20rpx;
      color: #999;
    }
  }
  
  .bg-color {
  	background-color: $uni-color-warning;
  }
  
  .acea-row.row-between-wrapper {
  	align-items: center;
  	justify-content: space-between
  }
  
  .sign-record .list .item .listn .itemn .name {
    width: 390rpx;
    font-size: 28rpx;
    color: #282828;
    margin-bottom: 10rpx;
  }
  .sign-record .list .item .listn .itemn {
    height: 120rpx;
    border-bottom: 1rpx solid #eee;
    padding-right: 30rpx;
    margin-left: 30rpx;
  }
  
</style>
